package testing;

import gamemngr.GameMngr;
import junit.framework.TestCase;
import logic.Country;
import logic.GameMap;
import logic.Player;
import logic.moves.SettleMove;


public class RedoUndoTest extends TestCase {
	public void testRedoUndo(){
		GameMngr game = new GameMngr();
		Player player = new Player("Me",new GameMngr());
		GameMap map = new GameMap();
		Country Israel = map.getCountries().get("Israel");
		game.addPlayer(player);
		SettleMove set = new SettleMove(Israel, player);
		player.addMove(set, false);
		player.undoMove(false);
		assertEquals(Israel.hasOwner(), false);
		player.redoMove(false);
		assertEquals(Israel.hasOwner(), true);
		assertEquals(player.hasCountry(Israel), true);
	}	
}


